#include "Character.h"

Character::Character(void)
{
}
Character::Character(const char c):m_cValue(c){
}
Character::~Character(void)
{
}
char Character::getCharacter() const {
	return m_cValue;
}
bool Character::operator==(const char& cValue) const {
	if (m_cValue==cValue) return true;
	return false;
}
bool Character::is_digit() const {
	if (m_cValue>='0'&&m_cValue<='9') return true;
	return false;
}
bool Character::is_nondigit() const{
	if (m_cValue>='a'&&m_cValue<='z'||m_cValue>='A'&&m_cValue<='Z'||m_cValue=='_') return true;
	return false;
}
bool Character::is_nonzero_digit() const{
	if (m_cValue>='1'&&m_cValue<='9') return true;
	return false;
}
bool Character::is_hexadecimal_digit() const {
	if (m_cValue>='0'&&m_cValue<='9'||m_cValue>='a'&&m_cValue<='f'||m_cValue>='A'&&m_cValue<='F') return true;
	return false;
}
bool Character::is_octal_digit() const {
	if (m_cValue>='0'&&m_cValue<='7') return true;
	return false;
}
bool Character::is_c_char() const {
	if (m_cValue=='\''||m_cValue=='\\'||m_cValue=='\n') return false;
	return true;
}
bool Character::is_punctuator() const{ 
	if (m_cValue=='['||m_cValue==']'||m_cValue=='('||m_cValue==')'||m_cValue=='{'||m_cValue=='}'||m_cValue=='.'||m_cValue=='&'||m_cValue=='*'||m_cValue=='+'||m_cValue=='-'||m_cValue=='~'||m_cValue=='!'||m_cValue=='/'||m_cValue=='%'||m_cValue=='<'||m_cValue=='>'||m_cValue=='^'||m_cValue=='|'||m_cValue=='?'||m_cValue==':'||m_cValue==';'||m_cValue=='='||m_cValue==','||m_cValue=='#') return true;
	return false;
}
bool Character::is_space() const {
	if (m_cValue==' '||m_cValue=='\t') return true;
	return false;
}
bool Character::is_eof() const {
	if (m_cValue==-1) return true;
	return false;
}